﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace SNSpirit.Domain.User
{
    [Serializable]
    [XmlRoot(ElementName = "user", Namespace = DomainUtillity.Namespace)]
    public abstract class UserEntity : DomainEntity, IEquatable<UserEntity>
    {
        public string Name { get; set; }

        public Sex Sex { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null || !(obj is UserEntity))
                return false;
            else
                return this.Equals(obj as UserEntity);
        }

        public override abstract int GetHashCode();

        public abstract bool Equals(UserEntity other);
    }
}
